<?php


/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Game
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
 
class Game_Model_Distributor extends Core_Model_Item_Abstract
{
  protected $_searchTriggers = array();
  
  protected $_formObjects;
  protected $_pluginObject;
  
  
  public function getForm($name)
  {
    if (!isset($this->_formObjects[$name]))
    {
      $form_key = "form_".$name;
      $this->_formObjects[$name] = new $this->$form_key;
    }
    return $this->_formObjects[$name];
  }
  
  
  public function getPlugin()
  {
    if (null === $this->_pluginObject)
    {
      $this->_pluginObject = new $this->plugin($this->config);
    }
    return $this->_pluginObject;
  }
  
}
